<?php
	if(isset($blog)):?>
		<section class="screenshots" id="screenshot-section">
			<div class="container">
				<!-- SECTION HEADER -->
				<div class="section-header wow fadeIn animated" data-wow-offset="10" data-wow-duration="1.5s">
					<h3 class="h301"><?php echo Yii::app()->params['text_blog1']?></h3>
					<p class="h3-info"><?php echo Yii::app()->params['text_blog2']?></p>
				</div>															
			</div>
			<!-- /END CONTAINER --> 
			<div class="slide2">
				<!-- Carousel
				================================================== -->
				<div id="myCarousel" class="carousel slide" data-ride="carousel">										 
					<div class="carousel-inner">
						<?php
							$html = '';
							foreach($blog as $key => $value):
								$active = ($key == 0)? 'active' : '';
								$html .= '<div class="col-sm-4 '. $active.'"><div data-target="#myCarousel" data-slide-to="'.$key.'">'.
											'<div class="ca-item">'.
												'<p class="arrow_up arrow_on"></p>'.
												'<div class="screen-item">'.
													'<p class="tit01">0'.($key+1).'</p>'.
													'<p class="tit02">'.$value['title'].'</p>'.
												'</div>'.
												'<p class="des01">'. strip_tags($value['short_description']).'</p>'.
											'</div>'.
										'</div>'.
										'<p class="link01"><a href="'.Yii::app()->baseUrl.'/'. $value['menu']['url'] .'/'. MyFunctionCustom::create_slug($value['title']).'-' . $value['id'].'.html">Read more</a></p></div>';
								?>
							<div class="item <?php echo $active?>">					  
							  <div class="container-fuild">
								<img src="<?php echo Yii::app()->baseUrl?>/images/<?php echo $value['cover_photo']?>" alt="<?php echo $value['title']?>">
							  </div>
							</div>
						<?php 
							endforeach;
						?>
					</div>
					<!-- Indicators -->
					<div class="carousel-indicators container">
						<?php echo $html;?>
					</div>
					<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
					<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
				</div>
			</div><!-- /.carousel -->	
		</section>
		<!-- /END SCREENSHOTS SECTION --> 
<?php endif;?>